package cn.iocoder.yudao.module.member.growth.service.admin;

import cn.iocoder.yudao.framework.business.basic.dao.query.CoreQueryWrapper;
import cn.iocoder.yudao.framework.business.basic.service.PageService;
import cn.iocoder.yudao.framework.business.basic.service.impl.BaseService;
import cn.iocoder.yudao.module.member.growth.dao.GrowthRecordMapper;
import cn.iocoder.yudao.module.member.growth.pojo.dto.GrowthRecordQueryDTO;
import cn.iocoder.yudao.module.member.growth.pojo.po.GrowthRecord;
import cn.iocoder.yudao.module.member.growth.pojo.vo.GrowthRecordVO;
import jakarta.annotation.Nonnull;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

/**
 * <pre>
 * OOoO0OOoO0OOOooo0oOOOO0OOOOO0oooOO0ooOOO0Ooooo0OOOOo0ooooO0OOooo0Ooooo0OOOOO
 * 服务
 * OOoO0OOoO0OOOooo0oOOOO0OOOOO0oooOO0ooOOO0Ooooo0OOOOo0ooooO0OOooo0Ooooo0OOOOO
 * </pre>
 *
 * @author 山野羡民（1032694760@qq.com）
 * @since 2025/05/08
 */
@Service
public class GrowthRecordService extends BaseService<GrowthRecord, GrowthRecordVO, GrowthRecordQueryDTO> implements PageService<GrowthRecordVO, GrowthRecordQueryDTO> {
    @Resource
    private GrowthRecordMapper growthRecordMapper;

    @Override
    public GrowthRecordMapper getInjectedMapper() {
        return growthRecordMapper;
    }

    @Nonnull
    @Override
    protected CoreQueryWrapper<GrowthRecord> buildQueryWrapper(GrowthRecordQueryDTO param) {
        CoreQueryWrapper<GrowthRecord> wrapper = super.buildQueryWrapper(param);
        wrapper.likeIfPresent("title", param.getTitle());
        return wrapper;
    }

}
